{extend name="layout/create" /}
{block name="form"}

<form id="form">
	<div class="form-group">
		<label class="control-label">{$tables['fields']['classs_id']['name']}</label>
		<select class="form-control" placeholder="" name="classs_id">
			<option value="0">--顶级--</option>
			{foreach $classs as $key=>$vo } 
			<option value="{$vo.id}">{:echolevel($vo.level)}  {$vo.name}</option>
			{/foreach}
		</select>
	</div>

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["title"]["name"]}</label>
		<input class="form-control" type="text" placeholder="" name="title" value="">
	</div>

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["url"]["name"]}</label>
		<input class="form-control" type="text" placeholder="" name="url" value="">
	</div>

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["target"]["name"]}</label>
		<select class="form-control" placeholder="" name="target">
			{foreach $tables["fields"]["target"]["options"] as $key=>$vo } 
			<option value="{$key}">{$vo}</option>
			{/foreach}
		</select>
	</div>

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["images"]["name"]}</label>
		<input class="form-control" type="text" placeholder="" name="images" id="images" value="" style="margin-bottom:10px;">
		<div class="form-group">
			<input id="imagesfile" type="file" multiple=true>
		</div>
	</div>

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["status"]["name"]}</label>
		<select class="form-control" placeholder="" name="status">
			{foreach $tables["fields"]["status"]["options"] as $key=>$vo } 
			<option value="{$key}">{$vo}</option>
			{/foreach}
		</select>
	</div>

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["recommend"]["name"]}</label>
		<select class="form-control" placeholder="" name="recommend">
			{foreach $tables["fields"]["recommend"]["options"] as $key=>$vo } 
			<option value="{$key}">{$vo}</option>
			{/foreach}
		</select>
	</div>

	<div class="form-group">
		<label class="control-label">{$tables["fields"]["topping"]["name"]}</label>
		<select class="form-control" placeholder="" name="topping">
			{foreach $tables["fields"]["topping"]["options"] as $key=>$vo } 
			<option value="{$key}">{$vo}</option>
			{/foreach}
		</select>
	</div>
	<div class="form-group">
		<label class="control-label">{$tables["fields"]["sort_time"]["name"]}</label>
		<div class="input-group date" id="sort_time" data-target-input="nearest">
			<input type="text" name="sort_time" class="form-control datetimepicker-input" data-target="#sort_time"/>
			<div class="input-group-append" data-target="#sort_time" data-toggle="datetimepicker">
				<div class="input-group-text"><i class="fa fa-calendar"></i></div>
			</div>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label">{$tables["fields"]["create_time"]["name"]}</label>
		<div class="input-group date" id="create_time" data-target-input="nearest">
			<input type="text" name="create_time" class="form-control datetimepicker-input" data-target="#create_time"/>
			<div class="input-group-append" data-target="#create_time" data-toggle="datetimepicker">
				<div class="input-group-text"><i class="fa fa-calendar"></i></div>
			</div>
		</div>
	</div>

	<div class="form-group">
	<label class="control-label">{$tables["fields"]["content"]["name"]}</label>
	<script id="content" name="content" type="text/plain" style="width:100%;height:300px;"></script>
	</div>

	<div class="tile-footer">
		<button class="btn btn-primary" type="button" id="submitbutton">
			<i class="fa fa-fw fa-lg fa-check-circle"></i>提交
		</button>   
	</div>
</form>

{/block}
{block name="javascript"}
<script>
upload("imagesfile","images");
$(function () {
	$("#sort_time").datetimepicker({
		locale: moment.locale("zh-cn"),
	});
});
$(function () {
	$("#create_time").datetimepicker({
		locale: moment.locale("zh-cn"),
	});
});
var content = UE.getEditor("content");
</script>
{/block}
